package com.fast.alden.admin.web.controller.monitor;


import com.fast.alden.admin.entity.vo.Server;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.net.UnknownHostException;

/**
 * 服务监控控制器
 */
@Tag(name = "ServerController", description = "服务监控")
@RestController
@RequestMapping("/server")
public class ServerController {
    @Operation(summary = "服务器信息", security = @SecurityRequirement(name = "openApiSecurityScheme"))
    @GetMapping
    public Server retrieve() throws UnknownHostException {
        Server server = new Server();
        server.copyTo();
        return server;
    }
}
